package org.example.DAO;

import org.example.entity.Reply;
import org.example.entity.Review;

import java.sql.SQLException;
import java.util.List;

public interface ReviewDao {
    int getReviewCountByContent(int contentId, String contentType) throws SQLException;

    Review getReviewByUserAndContent(int userId, int contentId, String contentType) throws SQLException;

    boolean addReview(Review review) throws SQLException;

    boolean updateReview(Review review) throws SQLException;

    List<Review> getReviewsByContent(int contentId, String contentType) throws SQLException;

    boolean deleteReview(int reviewId) throws SQLException;
    List<Review> getReviewsByUser(int userId, int offset, int limit) throws SQLException;

    int getReviewCountByUser(int userId) throws SQLException;

    Review getReviewById(int reviewId) throws SQLException;

    boolean addReply(Reply reply) throws SQLException;

    List<Reply> getRepliesByReview(int reviewId) throws SQLException;

}